package com.imyours.model;

import java.util.List;

/**
 * 用户自定义分组
 * 
 * @author SLevenc
 * 
 */
public class Team {

	/**
	 * 主键
	 */
	private long id;
	/**
	 * 分组名称
	 */
	private String name;
	/**
	 * 分组顺序
	 */
	private int order;
	/**
	 * 包含好友
	 */
	private List<Friend> friends;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	public List<Friend> getFriends() {
		return friends;
	}

	public void setFriends(List<Friend> friends) {
		this.friends = friends;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("id=").append(this.id).append("\n");
		sb.append("name=").append(this.name).append("\n");
		sb.append("order=").append(this.order).append("\n");
		if (this.friends != null && this.friends.size() > 0) {
			sb.append("friends:\n");
			for (int i = 0; i < friends.size(); i++) {
				sb.append("\t").append(friends.get(i)).append("\n");
			}
		}
		return sb.toString();
	}

}
